﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:local="clr-namespace:Toon"
					xmlns:localControls="clr-namespace:Toon.Controls"
					xmlns:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
					xmlns:System="clr-namespace:System;assembly=mscorlib"
					xmlns:win="clr-namespace:System.Windows;assembly=System.Windows">

    <Style TargetType="localControls:LabeledTextBlock">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localControls:LabeledTextBlock">
                    <Grid x:Name="RootElement">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <input:Label x:Name="Label" Margin="0,0,5,0"  VerticalAlignment="Top" Content="{TemplateBinding LabelContent}" Style="{TemplateBinding LabelStyle}"/>
                        <TextBlock Style="{TemplateBinding TextStyle}" Grid.Column="1" VerticalAlignment="Top" TextWrapping="Wrap" Text="{TemplateBinding Text}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="localControls:DetailRegion">
        <Setter Property="Foreground"
				Value="#FF000000" />
        <Setter Property="HorizontalContentAlignment"
				Value="Left" />
        <Setter Property="VerticalContentAlignment"
				Value="Top" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localControls:DetailRegion">
                    <Border Name="MouseOverBorder"
                            Background="{TemplateBinding Background}"
							BorderBrush="Transparent"
							BorderThickness="1">
                        <VisualStateManager.VisualStateGroups>
                            <win:VisualStateGroup x:Name="CommonStates">
                                <win:VisualState x:Name="Normal" />
                                <win:VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimation Duration="0"
														To="#FF99C1E2"
														Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
														Storyboard.TargetName="MouseOverBorder" />
                                    </Storyboard>

                                </win:VisualState>
                            </win:VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter Content="{TemplateBinding Content}"
											  ContentTemplate="{TemplateBinding ContentTemplate}"
											  Cursor="{TemplateBinding Cursor}"
											  Margin="{TemplateBinding Padding}"
											  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
											  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
